<script setup lang='ts'>
import { onMounted, ref } from 'vue'
import { NCard, NModal, useMessage } from 'naive-ui'
import SubscribeTo from '../SubscribeTo/index.vue'
import { useUserStore } from '@/store'
const message = useMessage()
const userStore = useUserStore()
const showModal = ref(false)
const subPay = ref<any>(null)
const show = () => {
  showModal.value = true
}
const bodyStyle = {
  width: '100%',
}

onMounted(() => {
  // const token = sessionStorage.getItem('token')
  // if (token)
  //   userStore.getUserInfo()
})

defineExpose({ show })
</script>

<template>
  <NModal v-model:show="showModal" class="custom-card" preset="card" title="" size="huge" :style="bodyStyle">
    <NCard title="AI绘图" class="custom-card-put" />
  </NModal>
  <SubscribeTo ref="subPay" />
</template>

<style>
.custom-card .n-card-header {
    display: none !important;
}

.custom-card .n-card__content {
    padding: 0 !important;
}

.custom-card-put .n-card-header {
    display: block !important;
}

.custom-card-put .n-card__content {
    padding: 20px !important;
}
</style>
